package com.design.movieticket.entity;


import com.alibaba.fastjson.annotation.JSONField;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.design.movieticket.common.base.BaseEntity;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import com.fasterxml.jackson.datatype.jsr310.deser.LocalDateTimeDeserializer;
import com.fasterxml.jackson.datatype.jsr310.ser.LocalDateTimeSerializer;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.SuperBuilder;
import org.springframework.format.annotation.DateTimeFormat;

import java.math.BigDecimal;
import java.time.LocalDateTime;

@AllArgsConstructor
@NoArgsConstructor
@Data
@SuperBuilder(toBuilder = true)
@TableName("coupon")
public class Coupon extends BaseEntity {
    @JsonSerialize(using = ToStringSerializer.class)
    @TableId(type = IdType.ASSIGN_ID)
    Long id;//优惠卷id

    String couponName;//优惠卷名

    String couponType;//优惠卷类型

    BigDecimal needPoints;//需要积分

    String details;//优惠卷描述

    BigDecimal startPay;//起始金额

    String couponDiscount;//活动力度

    LocalDateTime couponStartTime;//活动开始时间

    LocalDateTime couponEndTime;//活动结束时间
    
    String couponBy;//优惠卷活动发起人

    String examine;//审核人

    int examineStatus;//审核状态/0审核驳回 1审核通过 2审核等待

    int couponStatus;//活动状态/0未开启 1进行中 2已结束
}
